package com.infore.airsupervise.ui.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.FrameLayout;

import com.infore.airsupervise.R;
import com.infore.airsupervise.app.Constants;
import com.infore.airsupervise.other.listener.MainFragBtnClickListener;
import com.infore.airsupervise.ui.fragment.MapFragment;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * 污染源地图
 * （以传入污染源为地图中心，大考info window）
 *
 * @作者: dingxinlin
 * @创建时间: 2017/4/14 11:11
 */
public class PolluterMapActivity extends AppCompatActivity {

    @BindView(R.id.map_container)
    FrameLayout mapContainer;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_polluter_map);
        ButterKnife.bind(this);

        String mnStr = getIntent().getStringExtra(Constants.INTENT_STR_KEY);

        // 添加抽屉Fragment
        MapFragment drawerFrag = new MapFragment(mnStr, new MainFragBtnClickListener() {
            @Override
            public void onShowDrawerBtnClick() {
                finish();
            }

            @Override
            public void onZoomBtnClick(boolean isFullScreen) {

            }
        });

        getSupportFragmentManager().beginTransaction().replace(R.id.map_container, drawerFrag).commit();
    }
}
